#include <iostream>
#include "cocos2d.h"
#include <iostream>

using namespace std;

class FunctionLifeCrycle
{
public:
	FunctionLifeCrycle(){}
	FunctionLifeCrycle(const string &msg ):m_msg(msg)
	{
		cocos2d::log(" %s Begins!",m_msg.c_str());
	}
	~FunctionLifeCrycle()
	{
		cocos2d::log(" %s Ends! ",m_msg.c_str());
	}
private:
	std::string m_msg;
};

#define FUNCTION_LIFE_CRYCLE FunctionLifeCrycle(__FUNCTION__);

